<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // const getAttribute = (object /* 目标对象 */,attribute /*目标属性*/, defaultValue /*默认值*/)=>{ 
        // // @return any 
        // } 
        // example: 
        // const obj = {a: {b: {c: 100}}, d: [{f: 'abc'}]}; 
        // console.log(getAttribute(obj, 'a.b.c', 0) === 100 )
        // console.log(getAttribute(obj, 'a.b.e', 'default') === 'default' )
        // console.log(getAttribute(obj, 'd.0.f') === 'abc' )

    </script>
</body>

</html>